package com.ddxcloud.movie.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class LocalDateTimeUtil {

    /**
     * 判断当前时间是否大于某个时间
     * @param time yyyy-MM-dd HH:mm:ss
     * @return
     */
    public static boolean dateCompare(String time) {
        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime localTime = LocalDateTime.parse(time,dtf);
        return LocalDateTime.now().isAfter(localTime);
    }
}
